﻿using System.ComponentModel.DataAnnotations;

namespace DemoLib.Shared.Models
{
    public class BasicUser
    {
        [Required]
        [Display(Name = "User name")]
        public string UserName { get; set; }

        [Required]
        [DataType(DataType.Password)]
        [Display(Name = "Password")]
        public string Password { get; set; }
        
    }

    public class RegisterUser : BasicUser
    {
        [Required]
        [DataType(DataType.EmailAddress)]
        [Display(Name = "Email address")]
        public string EmailId { get; set; }
    }

    public class User : RegisterUser
    {
        public int Id { get; set; }

        public int RoleId { get; set; }
        public virtual Role Role { get; set; }
    }

    public class PublicUser : User
    {
        public string Addess { get; set; }
    }

    public class InternalUser : User
    {
        public string Dept { get; set; }
    }

    public class Role
    {
        public int Id { get; set; }

        [Required]
        [Display(Name = "Role name")]
        public string RoleName { get; set; }

        public string Permissions { get; set; }
    }

}
